import {defineStore} from 'pinia';
import defaultAvatar from '@/assets/imgs/avatar.jpg'

export const intServiceStore = defineStore('intService', {
    state: () => ({
        taskDetail: {},
        flowId: '101', // 流程id
        flowName:'', // 流程名称
        logStatus:[
            {
                name:'状态',
                props: 'status',
                value:''
            },
            {
                name:'运行时长',
                props:'runTime',
                value:''
            },
            {
                name:'运行开始时间',
                props:'startTime',
                value:''
            },
            {
                name:'运行结束时间',
                props:'endTime',
                value:''
            },
            {
                name:'同步速率',
                props:'syncRate',
                value:'0.00条/秒'
            },
            {
                name:'读取数量',
                props:'readCount',
                value:"0"
            },
            {
                name:'写入成功数量',
                props:'writeCount',
                value:"0"
            },
            {
                name:'写入错误数量',
                props:'errorCount',
                value:"0"
            },
        ],
    }),
    actions: {
        setFlowId(id) {
            this.flowId = id;
        },
        setTaskDetail(row) {
            this.taskDetail = row;
        },
        setFlowName(name) {
            this.flowName = name;
        },
        setLogStatus(data) {
            this.logStatus = data;
        }
    },
});

